<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>event事件测试-relatedTarget_getButton</title>
	<script type="text/javascript" src="../js/base.js"></script>
	<style>
		#div1,#div2{width:400px;height:400px; border:1px solid #000;}
		#div3{width:300px;height:300px;border:1px solid #00ff00}
	</style>
</head>
<body>
	<div id="div1">
		<div id="div3">	在发生mouseover和mouseout时,返回另外的被涉及元素,给div1绑定out，从3-1会触发3的mouseout事件，貌似会触发捕获事件
		</div>
	</div>
	<div>
		<input type="text" id="texttest"/>
	</div>
	<script type="text/javascript">
		var relatedTarget = function(event){
			alert(bh.getRelatedTarget(event).id);
		}
		var getButton = function(event){
			alert(bh.getButton(event));
		}
		var getCharCode = function(event){
			alert(bh.getCharCode(event));
		}
		bh.addEvent("mouseover",bh("div1"),relatedTarget);
		bh.addEvent("mousedown",bh("div3"),getButton);
		bh.addEvent("keypress",bh("texttest"),getCharCode);
	</script>
</body>
</html>
